void dynamicmemdemo(int n)
{
	int* p; int i;
	/*Give malloc the exact size of block in bytes */

	/* pointer points to beginning of array */
	p=malloc(n*sizeof(int));
	/*now can use any way you wish*/
	for(i=0; i<n; i++)
	{
	p[i] = i * i;
	}
	/*whatever else we might do*/
	/* when done, release block back to the system */
	free(p); /* no need to give the size, only the address */

}